<div class="row">
	<div class="col-md-12">
		<ol class="breadcrumb">
			<li>
				<a href="#" onclick="toHome()">
					主页
				</a>
			</li>
			<li class="active">
				优惠券码列表
			</li>
		</ol>
	</div>
</div>
<form role="form" class="form-horizontal">
	<div class="row page-cont">
		<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 cont-top">
			<div class="panel panel-white">
				<div class="panel-heading">
					<h4 class="panel-title">
						<span class="title-text">检索优惠券码</span>
					</h4>
					<div class="panel-tools">
						<div class="dropdown">
							<a data-toggle="dropdown" class="btn btn-xs dropdown-toggle btn-transparent-grey">
								<i class="fa fa-cog"></i>
							</a>
							<ul class="dropdown-menu dropdown-light pull-right" role="menu">
								<li>
									<a class="panel-collapse collapses" href="#"><i class="fa fa-angle-up"></i> <span>折叠</span> </a>
								</li>
								<li>
									<a class="panel-expand" href="#">
										<i class="fa fa-expand"></i> <span>全屏</span>
									</a>
								</li>
							</ul>
						</div>
						<a class="btn btn-xs btn-link panel-close" href="#">
							<i class="fa fa-times"></i>
						</a>
					</div>
				</div>
				<div class="panel-body">
					<div class="form-group panel-cont">
					    <label class="col-sm-2 control-label">优惠券码</label>
					    <div class="col-sm-4">
					      <input type="text" class="form-control" id="couponCode" />
					    </div>
					    <span class="col-sm-4 tips">
					    	<i class="fa fa-info-circle"></i>
					    	请输入数字
					    </span>
				  	</div>
					<div class="form-group panel-cont">
					    <label for="topLimit" class="col-sm-2 control-label">输入优惠券码下限</label>
					    <div class="col-sm-4">
					      <input type="text" class="form-control" id="topLimit" />
					    </div>
				  	</div>
					<div class="form-group panel-cont">
					    <label for="lowerLimit" class="col-sm-2 control-label">输入优惠券码上限</label>
					    <div class="col-sm-4">
					      <input type="text" class="form-control" id="lowerLimit" />
					    </div>
				  	</div>
					<div class="form-group panel-cont">
					    <label for="startDate" class="col-sm-2 control-label">开始时间</label>
					    <div class="col-sm-2 selectDate">
					   		<input type='text' readonly="readonly" class='form-control selectData' id='startDate' name='date' value='' />  
					   		<i class="fa fa-calendar"></i>
					    </div>
					    <label for="endDate" class="col-sm-2 control-label">结束时间</label>
					    <div class="col-sm-2 selectDate">
					    	<input type='text' readonly="readonly" class='form-control selectData' id='endDate' name='date' value='' />
					    	<i class="fa fa-calendar"></i>
					    </div>
					    <span class="col-sm-4 tips">
					    	<i class="fa fa-info-circle"></i>
					    	请选择创建日期的区间
					    </span>
				  	</div>
				  	<div class="form-group panel-cont">
					    <label for="coupon" class="col-sm-2 control-label">使用状态</label>
					    <div class="col-sm-4">
					      <select>
					      	<option value="全部">全部</option>
					      	<option value="已使用">已使用</option>
					      	<option value="未使用">未使用</option>
					      	<option value="已锁定">已锁定</option>
					      </select>
					    </div>
				  	</div>
				  	<div class="form-group">
				  		<div class="col-sm-5 col-sm-offset-5">
				  			<button type="button" class="btn btn-primary">查询</button>
				  			<button type="reset" class="btn">重置</button>
				  		</div>
				  	</div>
				</div>
			</div>
		</div>
		<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 cont-bottom">
			<div class="panel panel-white">
				<div class="panel-heading">
					<h4 class="panel-title">
						<span class="title-text">优惠券码列表</span>
					</h4>
					<div class="panel-tools">
						<div class="dropdown">
							<a data-toggle="dropdown" class="btn btn-xs dropdown-toggle btn-transparent-grey">
								<i class="fa fa-cog"></i>
							</a>
							<ul class="dropdown-menu dropdown-light pull-right" role="menu">
								<li>
									<a class="panel-collapse collapses" href="#"><i class="fa fa-angle-up"></i> <span>折叠</span> </a>
								</li>
								<li>
									<a class="panel-expand" href="#">
										<i class="fa fa-expand"></i> <span>全屏</span>
									</a>
								</li>
							</ul>
						</div>
						<a class="btn btn-xs btn-link panel-close" href="#">
							<i class="fa fa-times"></i>
						</a>
					</div>
				</div>
				<div class="row table-btn">
					<div class="col-sm-12">
						<button type="button" class="btn btn-primary">导出</button>
					</div>
				</div>
				<div class="panel-body table-body">
					<table class="table table-bordered table-hover">
						<thead>
							<tr>
								<th class="hidden-xs">优惠券码</th>
								<th class="hidden-xs">优惠券编码</th>
								<th class="hidden-xs">使用状态</th>
								<th class="hidden-xs">是否分配</th>
								<th class="hidden-xs">创建人</th>
								<th class="hidden-xs">创建日期</th>
								<th class="hidden-xs">操作</th>
							</tr>
						</thead>
						<tbody>
							<tr align="center">
								<td>2343</td>
								<td>3423</td>
								<td>234</td>
								<td></td>
								<td></td>
								<td></td>
								<td>
									<button type="button" class="btn btn-dark-yellow check-btn">查看&nbsp;<i class="fa fa-eye"></i></button>
									<button type="button" class="btn btn-green edit-btn">分配&nbsp;<i class="fa fa-edit"></i></button>
								</td>
							</tr>
						</tbody>
					</table>
				</div>
			</div>
		</div>
	</div>
</form>
<script>
	datePicker($("#startDate"));  // 开始时间
	datePicker($("#endDate"));    // 结束时间



	// getDate($("#startDate"));
	// getDate($("#endDate"));
	

	// 查看详情
	toOperat($(".check-btn"),"view/couponCode/coupon-code-view.html");

	// 分配
	toOperat($(".edit-btn"),"view/couponCode/coupon-code-edit.html");
	
	
	// 信息验证
	function checkMsg(){
		// if($("#couponName").val() == ""){
		// 	alert("优惠券名称不能为空");
		// 	$("#couponName").focus();
		// 	return false;
		// }else if($("#startDate").val() == ""){
		// 	alert("请选择开始时间");
		// 	$("#startDate").focus();
		// 	return false;
		// }else if($("#endDate").val() == ""){
		// 	alert("请选择结束时间");
		// 	$("#endDate").focus();
		// 	return false;
		// }else{
		// 	return true;
		// }
	}


	// 查询
	function queryCoupon(){
		// if(checkMsg()){
		// 	alert("1");
		// }
	}
</script>
